﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL.Repositories;
using ggHD.Domain.BizObj;
using ggHD.Domain.Repisitories;
using LinqToDB;

namespace ggHD.DAL.Repositories
{
    public class CustomerRepository :  ICustomerRepository
    {
        private Repository<Customer, string> _repository;

        public CustomerRepository(IDataContext context)
        {
            _repository = new Repository<Customer, string>(context);
        }

        public Customer Get(string key)
        {
            return _repository.Get(key);
        }

        public IQueryable<Customer> Select(Func<Customer, bool> predicate)
        {
            return _repository.Select(predicate);
        }

        public IQueryable<Customer> All
        {
            get
            {
                return _repository.All;
            }
        }
    }
}
